package com.software.decorator;

public class FastFoodDemo {
    public static void main(String[] args) {
        FastFood fastFood = new FryRice("炒米", 10);
        System.out.println(fastFood.getDesc() + " " + fastFood.cost());
        fastFood = new EggMeal(fastFood, "鸡蛋", 2);
        System.out.println(fastFood.getDesc() + " " + fastFood.cost());
        fastFood = new EggMeal(fastFood, "鸡蛋", 2);
        System.out.println(fastFood.getDesc() + " " + fastFood.cost());
        System.out.println("------------------------------------------");
        FastFood fastFood1 = new FryNoodle("炒面", 12.5f);
        System.out.println(fastFood1.getDesc() + " " + fastFood1.cost());
        fastFood1 = new EggMeal(fastFood1, "鸡蛋", 2);
        System.out.println(fastFood1.getDesc() + " " + fastFood1.cost());
        fastFood1 = new HamMeal(fastFood1, "火腿", 2.5f);
        System.out.println(fastFood1.getDesc() + " " + fastFood1.cost());
    }
}
